{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "### Market Data Representation\n",
    "Market data is a key part of gs_quant. The `MarketDataPattern` class allows the user to select a collection of this \n",
    "observable market data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    },
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "from gs_quant.risk import MarketDataPattern\n",
    "MarketDataPattern?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A `MarketDataPattern` can be instantiated with any combination of the following attributes:\n",
    "\n",
    "- `mkt_type`  - natural category of risk representation\n",
    "- `mkt_asset` - marked observable\n",
    "- `mkt_class` - market priceable\n",
    "- `mkt_point`  - unique identifier for the marked observable within a mkt_class\n",
    "\n",
    "The highest level of market data classification is the `mkt_type`. Examples of mkt_type include: 'IR', 'IR Vol' and 'FX'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    },
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "# you can instantiate a MarketDataPattern with keyword arguments\n",
    "ir_mdp = MarketDataPattern(mkt_type='IR')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    },
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "# or positional arguments\n",
    "fx_mdp2 = MarketDataPattern('FX')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}